<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Pig(name, age) {
            this.name = name;//实例属性
            this.age = age;
        }
        const pieqi = new Pig('佩奇', '18');
        console.log(pieqi.name);//访问实例对象的属性


        function Person() {

        }
        Person.eyes = '2';//静态属性
        Person.walk = () => {
            console.log('^_^人人都会走路');
        }//静态方法


    </script>
</body>

</html>